/**
 * 全局主题配置
 * @description 定义所有可用的主题配置
 */

// 主题类型定义
export interface ThemeConfig {
    name: string
    description: string
    icon: string
    gradient: string
    primary: string
    secondary: string
    accent: string
    background: string
    surface: string
    text: {
        primary: string
        secondary: string
        tertiary: string
    }
    border: string
    shadow: string
}

export type ThemeKey = 'cyber' | 'neon' | 'ocean' | 'sunset' | 'forest' | 'galaxy' | 'light' | 'dark' | 'pastel' | 'mono'

// 主题配置映射
export const THEME_CONFIGS: Record<ThemeKey, ThemeConfig> = {
    // 赛博朋克主题
    cyber: {
        name: '赛博朋克',
        description: '未来科技感',
        icon: '🤖',
        gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
        primary: '#667eea',
        secondary: '#764ba2',
        accent: '#00f5ff',
        background: 'linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%)',
        surface: 'rgba(255, 255, 255, 0.05)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.8)',
            tertiary: 'rgba(255, 255, 255, 0.6)'
        },
        border: 'rgba(255, 255, 255, 0.1)',
        shadow: '0 8rpx 32rpx rgba(0, 0, 0, 0.3)'
    },

    // 霓虹夜色主题
    neon: {
        name: '霓虹夜色',
        description: '炫彩夜晚',
        icon: '🌃',
        gradient: 'linear-gradient(135deg, #ff006e 0%, #8338ec 100%)',
        primary: '#ff006e',
        secondary: '#8338ec',
        accent: '#ffbe0b',
        background: 'linear-gradient(135deg, #1a0033 0%, #2d1b69 50%, #0f0f23 100%)',
        surface: 'rgba(255, 255, 255, 0.08)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.85)',
            tertiary: 'rgba(255, 255, 255, 0.65)'
        },
        border: 'rgba(255, 255, 255, 0.15)',
        shadow: '0 8rpx 32rpx rgba(255, 0, 110, 0.2)'
    },

    // 深海蓝调主题
    ocean: {
        name: '深海蓝调',
        description: '宁静深邃',
        icon: '🌊',
        gradient: 'linear-gradient(135deg, #0077be 0%, #00a8cc 100%)',
        primary: '#0077be',
        secondary: '#00a8cc',
        accent: '#90e0ef',
        background: 'linear-gradient(135deg, #001219 0%, #005577 50%, #0a9396 100%)',
        surface: 'rgba(255, 255, 255, 0.06)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.82)',
            tertiary: 'rgba(255, 255, 255, 0.62)'
        },
        border: 'rgba(255, 255, 255, 0.12)',
        shadow: '0 8rpx 32rpx rgba(0, 119, 190, 0.2)'
    },

    // 日落余晖主题
    sunset: {
        name: '日落余晖',
        description: '温暖浪漫',
        icon: '🌅',
        gradient: 'linear-gradient(135deg, #ff7b7b 0%, #ff9500 100%)',
        primary: '#ff7b7b',
        secondary: '#ff9500',
        accent: '#ffd23f',
        background: 'linear-gradient(135deg, #2c1810 0%, #8b5a3c 50%, #d4a574 100%)',
        surface: 'rgba(255, 255, 255, 0.07)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.83)',
            tertiary: 'rgba(255, 255, 255, 0.63)'
        },
        border: 'rgba(255, 255, 255, 0.13)',
        shadow: '0 8rpx 32rpx rgba(255, 123, 123, 0.2)'
    },

    // 森林绿意主题
    forest: {
        name: '森林绿意',
        description: '自然清新',
        icon: '🌲',
        gradient: 'linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%)',
        primary: '#56ab2f',
        secondary: '#a8e6cf',
        accent: '#7fb069',
        background: 'linear-gradient(135deg, #1b4332 0%, #2d5016 50%, #52b788 100%)',
        surface: 'rgba(255, 255, 255, 0.06)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.81)',
            tertiary: 'rgba(255, 255, 255, 0.61)'
        },
        border: 'rgba(255, 255, 255, 0.11)',
        shadow: '0 8rpx 32rpx rgba(86, 171, 47, 0.2)'
    },

    // 星河璀璨主题
    galaxy: {
        name: '星河璀璨',
        description: '宇宙星空',
        icon: '🌌',
        gradient: 'linear-gradient(135deg, #2c1810 0%, #8b5a3c 50%, #f4a261 100%)',
        primary: '#2c1810',
        secondary: '#8b5a3c',
        accent: '#f4a261',
        background: 'linear-gradient(135deg, #0d1b2a 0%, #415a77 50%, #778da9 100%)',
        surface: 'rgba(255, 255, 255, 0.05)',
        text: {
            primary: '#ffffff',
            secondary: 'rgba(255, 255, 255, 0.8)',
            tertiary: 'rgba(255, 255, 255, 0.6)'
        },
        border: 'rgba(255, 255, 255, 0.1)',
        shadow: '0 8rpx 32rpx rgba(244, 162, 97, 0.2)'
    },

    // 浅色主题 - 全新清新浅亮搭配（高对比度）
    light: {
        name: '清新浅亮',
        description: '纯净明快·通透层次',
        icon: '☀️',
        gradient: 'linear-gradient(135deg, #60a5fa 0%, #34d399 100%)',
        primary: '#2563eb',
        secondary: '#06b6d4',
        accent: '#10b981',
        background: 'linear-gradient(135deg, #f9fafb 0%, #ecfeff 50%, #eff6ff 100%)',
        surface: 'rgba(255, 255, 255, 0.92)',
        text: {
            primary: '#0f172a',
            secondary: '#334155',
            tertiary: '#64748b'
        },
        border: 'rgba(15, 23, 42, 0.08)',
        shadow: '0 6rpx 20rpx rgba(2, 6, 23, 0.08)'
    },

    // 深色主题 - 重新设计的经典深色搭配
    dark: {
        name: '经典深色',
        description: '护眼深色',
        icon: '🌙',
        gradient: 'linear-gradient(135deg, #6366f1 0%, #14b8a6 100%)',
        primary: '#6366f1',
        secondary: '#14b8a6',
        accent: '#22c55e',
        background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%)',
        surface: 'rgba(51, 65, 85, 0.6)',
        text: {
            primary: '#f8fafc',
            secondary: '#cbd5e1',
            tertiary: '#94a3b8'
        },
        border: 'rgba(148, 163, 184, 0.15)',
        shadow: '0 4rpx 16rpx rgba(0, 0, 0, 0.25)'
    },

    // 轻柔马卡龙主题 - 全新配色（更柔和、更通透，与浅亮区分更明显）
    pastel: {
        name: '轻柔马卡龙',
        description: '柔和奶油·温暖治愈',
        icon: '🍨',
        gradient: 'linear-gradient(135deg, #ffd6e7 0%, #c7f9cc 100%)',
        primary: '#ffcad4',
        secondary: '#c7f9cc',
        accent: '#bde0fe',
        background: 'linear-gradient(135deg, #fffaf0 0%, #fff1f2 50%, #f8fff4 100%)',
        surface: 'rgba(255, 255, 255, 0.9)',
        text: {
            primary: '#374151',
            secondary: '#6b7280',
            tertiary: '#9ca3af'
        },
        border: 'rgba(55, 65, 81, 0.08)',
        shadow: '0 6rpx 20rpx rgba(17, 24, 39, 0.06)'
    },

    // 极简单色主题
    mono: {
        name: '极简黑白',
        description: '克制极简',
        icon: '⚫️',
        gradient: 'linear-gradient(135deg, #111827 0%, #374151 100%)',
        primary: '#111827',
        secondary: '#374151',
        accent: '#9ca3af',
        background: 'linear-gradient(135deg, #0b0f1a 0%, #111827 50%, #1f2937 100%)',
        surface: 'rgba(255, 255, 255, 0.04)',
        text: {
            primary: '#f3f4f6',
            secondary: 'rgba(243, 244, 246, 0.8)',
            tertiary: 'rgba(243, 244, 246, 0.6)'
        },
        border: 'rgba(255, 255, 255, 0.08)',
        shadow: '0 8rpx 24rpx rgba(0, 0, 0, 0.28)'
    }
}

// 默认主题
export const DEFAULT_THEME: ThemeKey = 'cyber'

// 主题存储键
export const THEME_STORAGE_KEY = 'app_theme'
